#include "CPositionDiscriptor.h"

CPositionDiscriptor::CPositionDiscriptor(void)
:IDescriptorData(DESCRIPTOR_TAG_CPOSITION) 
, m_wXPos(0) 
, m_wYPos(0)
, m_wWidth(0)
, m_wHeight(0) 
{	
}

CPositionDiscriptor::~CPositionDiscriptor(void)
{
}


void CPositionDiscriptor::GetData(BYTE* buff  , int &len)
{
	CBuffer stBuffer(buff, DESCRIPTOR_MAXLEN);

	PACK_DESCRIPTOR_BUFFER_START(stBuffer, DESCRIPTOR_TAG_CPOSITION);

	stBuffer.Write((WORD)m_wXPos);
	stBuffer.Write((WORD)m_wYPos);
	stBuffer.Write((WORD)m_wWidth);
	stBuffer.Write((WORD)m_wHeight);
	 
	len = PACK_DESCRIPTOR_BUFFER_END(stBuffer);
}